Skip to content

test: improve coverage for firestore deploy#10346

Open
joehan wants to merge 3 commits intonextfrom
test/firestore-deploy
Open

test: improve coverage for firestore deploy#10346
joehan wants to merge 3 commits intonextfrom
test/firestore-deploy

Conversation

@joehan
Copy link
Copy Markdown
Member

@joehan joehan commented Apr 15, 2026

Description

Add hermetic tests validating Firestore index and security rule dispatch flows within src/deploy/firestore/deploy.ts.

Scenarios Tested

  • Sequential initialization of defined configurations
  • Intermittent state retries

Sample Commands

npm run mocha -- 'src/deploy/firestore/deploy.spec.ts'

### Description
Add hermetic tests validating Firestore index and security rule dispatch flows within `src/deploy/firestore/deploy.ts`.

### Scenarios Tested
- Sequential initialization of defined configurations
- Intermittent state retries

### Sample Commands
`npm run mocha -- 'src/deploy/firestore/deploy.spec.ts'`
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@joehan joehan changed the base branch from main to next April 22, 2026 20:44
@joehan joehan requested a review from aalej April 22, 2026 20:44
@joehan
Copy link
Copy Markdown
Member Author

joehan commented Apr 22, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive unit test suite for the Firestore deployment logic in src/deploy/firestore/deploy.spec.ts. The tests cover various scenarios, including skipping deployment when no rules or indexes are present, handling successful rules and index deployments, and verifying retry logic for 404 errors during index deployment. Feedback focuses on adhering to the repository's TypeScript style guide by removing the use of as unknown as type assertions, which are used as escape hatches. Suggestions are provided to use proper type assertions, valid enum members, or Object.assign for more type-safe error object construction.

Comment thread src/deploy/firestore/deploy.spec.ts Outdated
Comment thread src/deploy/firestore/deploy.spec.ts Outdated
Comment thread src/deploy/firestore/deploy.spec.ts Outdated
Copy link
Copy Markdown
Contributor

@aalej aalej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants